package com.shuda.business.data.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;

/**
 * 数据处理引擎实体类
 */
@TableName("data_processing_engine")
@Schema(name = "DataProcessingEngineEntity", description = "数据处理引擎实体")
public class DataProcessingEngineEntity {

    @TableId(type = IdType.AUTO)
    @Schema(description = "配置ID")
    private Long id;

    @Schema(description = "渠道ID")
    private Long channelId;

    @Schema(description = "渠道名称")
    private String channelName;

    @Schema(description = "配置类型(field_mapping-字段映射,script-脚本配置)")
    private String configType;

    @Schema(description = "源字段名")
    private String sourceField;

    @Schema(description = "目标字段名")
    private String targetField;

    @Schema(description = "字段映射规则(JSON)")
    private String mappingRule;

    @Schema(description = "转换脚本")
    private String transformScript;

    @Schema(description = "脚本语言(javascript-groovy,python)")
    private String scriptLanguage;

    @Schema(description = "配置状态(enabled-启用,disabled-禁用)")
    private String configStatus;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "逻辑删除标识(0-未删除,1-已删除)")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    /**
    *
    * DataProcessingEngineEntity 访问器
    * @param $params$
    * @return $returns$
    * @author ink
    * @Description: 去除Lombok，显式提供getter/setter，兼容LambdaQueryWrapper方法引用
    * @date 2025-11-10 00:08
    */
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public Long getChannelId() { return channelId; }
    public void setChannelId(Long channelId) { this.channelId = channelId; }

    public String getChannelName() { return channelName; }
    public void setChannelName(String channelName) { this.channelName = channelName; }

    public String getConfigType() { return configType; }
    public void setConfigType(String configType) { this.configType = configType; }

    public String getSourceField() { return sourceField; }
    public void setSourceField(String sourceField) { this.sourceField = sourceField; }

    public String getTargetField() { return targetField; }
    public void setTargetField(String targetField) { this.targetField = targetField; }

    public String getMappingRule() { return mappingRule; }
    public void setMappingRule(String mappingRule) { this.mappingRule = mappingRule; }

    public String getTransformScript() { return transformScript; }
    public void setTransformScript(String transformScript) { this.transformScript = transformScript; }

    public String getScriptLanguage() { return scriptLanguage; }
    public void setScriptLanguage(String scriptLanguage) { this.scriptLanguage = scriptLanguage; }

    public String getConfigStatus() { return configStatus; }
    public void setConfigStatus(String configStatus) { this.configStatus = configStatus; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public String getCreateBy() { return createBy; }
    public void setCreateBy(String createBy) { this.createBy = createBy; }

    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }

    public String getUpdateBy() { return updateBy; }
    public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }

    public LocalDateTime getUpdateTime() { return updateTime; }
    public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; }

    public Integer getDeleted() { return deleted; }
    public void setDeleted(Integer deleted) { this.deleted = deleted; }
}